﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MaxLeaf.Common;
using System.Data;
using MaxLeaf.DB;

namespace MaxLeaf.DAL
{
    public class goods_barcodeDALBuilder : BaseDALBuilder
    {
        
        public goods_barcodeDALBuilder():base()
        {
            W2KDAL = new W2K.goods_barcodeDAL();
            K2KDAL = new K2K.t_BarCodeDAL();
 
        }

        protected override bool ValidCheck(ServerInfo orgServer, ServerInfo destServer, DataRowView drvLog)
        {
            if (CvtFunc.ToInt(drvLog[DEL.LogDEL.LogStatus]) == (int)LogStatus.Delete)
            {
                return true;
            }

            if (orgServer.Type== ServerType.Web &&  destServer.Type == ServerType.K3)
            {
             
                    if (!destServer.MasterDB)
                    {

                        LogManager.Debug(string.Format("  {0} 不分发", destServer));
                        return false;

                    }

            }

            return base.ValidCheck(orgServer, destServer, drvLog);
        }
       

        
    }
}